﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Daily.aspx.cs" Inherits="Moral_Teacher_DailyManage_Daily" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Common/css/main.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Common/js/jquery.js"></script>
    <script type="text/javascript" src="../../Common/js/common.js"></script>
    <script type="text/javascript" src="../../../Common/js/TableForExport.js"></script>
    <style type="text/css">
        a:hover{text-decoration:underline;}
    </style>
    
    <script type="text/javascript">
        function detailView()
        {
            var liList = parent.leftFrame.document.getElementById("detailLi");
//            parent.leftFrame.removeActiveStyle();
//            liList.style.display = "block";
//            liList.className = "active";
        }
        
        function getExcel()
        {
            var cells = GetTableInfo(document.getElementById("<%=tbResult.ClientID %>"));
            if(cells!=null)
            {
                PageMethods.GetExcel(cells,function(result){
                document.getElementById('downloadf').src = "";
                document.getElementById('downloadf').src = "../../../PostFileBytes.aspx";
                },function(err){alert(err._message);alert(err._message);});
            }
        }
    </script>
    
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        </asp:ScriptManager>
        <div id="divMain" class="mainWarp" style="width: 100%; height: 99%;">
            <div class="pageBody" style="width: 100%; height: 99%;">
            <br/>
                <table border="0">
                    <tr>
                        <td style=" padding-left:10px;">
                            <asp:DropDownList ID="selYear" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td style=" padding-left:10px;">
                            <asp:DropDownList ID="selGrade" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td style=" padding-left:10px;">
                            <asp:Button class="commonBut" ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click" />
                            <!--<input class="commonBut" name="btnQuery" type="button" value="查询" />-->
                        </td>
                        <td style=" padding-left:10px;">
                            <input id="Button2" type="button" class="commonBut" value="导出Excel" onclick="getExcel()" />
                        </td>
                    </tr>
                </table>
                <br/>
                <asp:UpdatePanel ID="upResult" runat="server">
                    <ContentTemplate>
                        <asp:Table ID="tbResult" runat="server" CssClass="useList1" Style="margin-left: 5px;">
                        </asp:Table>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnQuery" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
            </div>
        </div>
    </form>
    <div id="upInputPop" class="layoutWarp" style="display: none">
        <iframe src="" name="downloadf" id="downloadf" style="height: 80%;width: 95%;overflow-y:auto;overflow-x:none;" frameborder="0"   ></iframe>
    </div>
</body>
</html>
